<?php
class Design_Controller extends Template_Controller {

	public $template = 'client/index';
	public $language = '';
    public function __construct()
    {
        parent::__construct();
        
        //Css
        //$this->template->css = $this->site['theme_url'].'article/article.css';
       	$this->language = $this->get_client_lang();
    }
    
	public function __call($method, $arguments)
	{
		// Disable auto-rendering
		$this->auto_render = FALSE;
	}
	
    public function index()
    {	
		$this->page();
		
    }
    public function page()
    {
    	$language= $this->get_client_lang();
		$this->template->content = new View('design/index');
		$model = new Programs_Model(); 
		$this->db->limit(10,0);	
		$mPrograms = $model->get_with_active($this->language);
		$this->template->content->mPrograms= $mPrograms;
		
		
    }
    public function programs($id)
    {
    	$this->template->content = new View('design/programs');
    	$language = $this->get_client_lang();
		$model = new Programs_Model(); 
		$this->db->where('programs_content.programs_id',$id);
		$mlist = $model->get_with_active($language);
    	$this->template->content->mr = $mlist[0];
    }
	
	 public function solutions($id)
    {
    	$this->template->content = new View('design/solutions');
    	$language = $this->get_client_lang();
		$model = new Solutions_Model(); 
		$this->db->where('solutions_content.solutions_id',$id);
		$mlist = $model->get_with_active($language);
    	$this->template->content->mr = $mlist[0];
    }
	 public function coaching($id)
    {
    	$this->template->content = new View('design/coaching');
    	$language = $this->get_client_lang();
		$model = new Coaching_Model(); 
		$this->db->where('coaching_content.coaching_id',$id);
		$mlist = $model->get_with_active($language);
    	$this->template->content->mr = $mlist[0];
    }
}
?>